package com.cloudptt.wp.ui;

import com.cloudptt.wp.R;
import com.cloudptt.wp.ScreenManager;


import android.view.KeyEvent;

import androidx.appcompat.app.AppCompatActivity;

public abstract class BaseActivity extends AppCompatActivity {
	
	public boolean onKeyDown(int keyCode, KeyEvent event) {  
        if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {  
        	ScreenManager.getScreenManager().popActivity();
            return true;  
        } else  
            return super.onKeyDown(keyCode, event);  
    } 
	@Override
	public void finish() {
		super.finish( );
		overridePendingTransition( R.anim.in_from_left, 
			R.anim.out_to_right );
	}
}
